// 删除数组里面值跟n相等的
let arr = [1,3,2,5,4,5,4,2,3,1]
let n = 3

for(let t = 0; t < arr.length; t++){
    if(arr[t] == n){
        arr.splice(t , 1)
    }
}

console.log(arr)